﻿using System;
using mojoPortal.Business;
using mojoPortal.Business.WebHelpers;
using ud_Article.Business;

namespace ud_Article.UI
{
    public class ArticleContentDeleteHandler : ContentDeleteHandlerProvider
    {
        public override void DeleteContent(int moduleId, Guid moduleGuid)
        {
            Article.DeleteByModule(moduleId);
            DBArticleAttachment repositoryAttachment = new DBArticleAttachment();
            repositoryAttachment.DeleteByModule(moduleId);
            ContentMetaRespository metaRepository = new ContentMetaRespository();
            metaRepository.DeleteByModule(moduleGuid);
            FriendlyUrl.DeleteByPageGuid(moduleGuid);
        }
    }
}
